package com.homework2;

import java.util.ArrayList;
import java.util.HashSet;

public class Test05 {
    public static void main(String[] args) {
        String arr[]={"abc","bad","abc","aab","bad","cef","jhi"};
        ArrayList<String> list = new ArrayList<>();
        HashSet<String> hashSet = new HashSet<>();
        for (String s : arr) {
            hashSet.add(s);
        }
//        System.out.println(hashSet);
        for (String s : hashSet) {
            list.add(s);
        }
        for (String s : list) {
            System.out.print(s+" ");
        }
    }
}
